---
layout: m1x_soap
title: Catalog Product
---

				    
<h2><a name="MAPI-Product-Module%3AMageCatalog"></a>Module: Mage_Catalog</h2>

<p>The Mage_Catalog module allows you to manage categories and products.</p>

<h4><a name="MAPI-Product-Product"></a>Product</h4>

<p>Allows you to manage products.</p>

<p><b>Resource Name</b>: catalog_product</p>

<p><b>Aliases</b>:</p>
<ul>
	<li>product</li>
</ul>


<p><b>Methods</b>:</p>
<ul>
	<li><a href="catalog_product.currentStore.html" title="catalog_product.currentStore">catalog_product.currentStore</a> &#45; Set/Get the current store view</li>
	<li><a href="catalog_product.list.html" title="catalog_product.list">catalog_product.list</a> &#45; Retrieve the list of products using filters</li>
	<li><a href="catalog_product.info.html" title="catalog_product.info">catalog_product.info</a> &#45; Retrieve information about the required product</li>
	<li><a href="catalog_product.create.html" title="catalog_product.create">catalog_product.create</a> &#45; Create a new product</li>
	<li><a href="catalog_product.update.html" title="catalog_product.update">catalog_product.update</a> &#45; Update a required product</li>
	<li><a href="catalog_product.setSpecialPrice.html" title="catalog_product.setSpecialPrice">catalog_product.setSpecialPrice</a> &#45; Set special price for a product</li>
	<li><a href="catalog_product.getSpecialPrice.html" title="catalog_product.getSpecialPrice">catalog_product.getSpecialPrice</a> &#45; Get special price for a product</li>
	<li><a href="catalog_product.delete.html" title="catalog_product.delete">catalog_product.delete</a> &#45; Delete a required product</li>
	<li><a href="catalog_product.listOfAdditionalAttributes.html" title="catalog_product.listOfAdditionalAttributes">catalog_product.listOfAdditionalAttributes</a> &#45; Get the list of additional attributes</li>
</ul>


<h4><a name="MAPI-Product-Faults"></a>Faults</h4>


<table><tbody>
<tr>
<th> Fault Code </th>
<th> Fault Message </th>
</tr>
<tr>
<td> 100 </td>
<td> Requested store view not found. </td>
</tr>
<tr>
<td> 101 </td>
<td> Product not exists. </td>
</tr>
<tr>
<td> 102 </td>
<td> Invalid data given. Details in error message. </td>
</tr>
<tr>
<td> 103 </td>
<td> Product not deleted. Details in error message. </td>
</tr>
</tbody></table>


<h4><a name="MAPI-Product-Examples"></a>Examples</h4>

<h5><a name="MAPI-Product-Example1.Retrievingthe%EF%BB%BFproductlist"></a>Example 1. Retrieving the ﻿product list</h5>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: java; gutter: false">$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy-&gt;login('apiUser', 'apiKey');

$filters = array(
    'sku' =&gt; array('like'=&gt;'zol%')
);

$products = $proxy-&gt;call($sessionId, 'product.list', array($filters));

var_dump($products);</pre>
		</div>
</div></div>

<h5><a name="MAPI-Product-Example2.Creating%2Cviewing%2Cupdating%2Canddeletingaproduct"></a>Example 2. Creating, viewing, updating, and deleting a product</h5>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: java; gutter: false">$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy-&gt;login('apiUser', 'apiKey');

$attributeSets = $proxy-&gt;call($sessionId, 'product_attribute_set.list');
$set = current($attributeSets);


$newProductData = array(
    'name'              =&gt; 'name of product',
     // websites - Array of website ids to which you want to assign a new product
    'websites'          =&gt; array(1), // array(1,2,3,...)
    'short_description' =&gt; 'short description',
    'description'       =&gt; 'description',
    'status'            =&gt; 1,
    'weight'            =&gt; 0,
    'tax_class_id'      =&gt; 1,
    'categories'    =&gt; array(3),    //3 is the category id
    'price'             =&gt; 12.05
);

// Create new product
$proxy-&gt;call($sessionId, 'product.create', array('simple', $set['set_id'], 'sku_of_product', $newProductData));
$proxy-&gt;call($sessionId, 'product_stock.update', array('sku_of_product', array('qty'=&gt;50, 'is_in_stock'=&gt;1)));

// Get info of created product
var_dump($proxy-&gt;call($sessionId, 'product.info', 'sku_of_product'));

// Update product name on german store view
$proxy-&gt;call($sessionId, 'product.update', array('sku_of_product', array('name'=&gt;'new name of product'), 'german'));

// Get info for default values
var_dump($proxy-&gt;call($sessionId, 'product.info', 'sku_of_product'));
// Get info for german store view

var_dump($proxy-&gt;call($sessionId, 'product.info', array('sku_of_product', 'german')));

// Delete product
$proxy-&gt;call($sessionId, 'product.delete', 'sku_of_product');

try {
    // Ensure that product deleted
    var_dump($proxy-&gt;call($sessionId, 'product.info', 'sku_of_product'));
} catch (SoapFault $e) {
    echo "Product already deleted";
}</pre>
		</div>
</div></div>

				    
Create the Magento file system owner                   			    
